package it11.Capood.DataLogic;
import java.io.Serializable;
import java.util.Date;

import android.bluetooth.BluetoothDevice;
import android.text.format.DateFormat;


public abstract class Message implements Serializable {

	private static final long serialVersionUID = 1L;
	private Date date;
	private Message.Type type;
	private String device = null;
	
	public enum Type{
		TEXT, FILE, BOOL, FILE_INFO
	}
	
	public Message(Date d, Message.Type t){
		date = d;
		type = t;
	}
	
	public Date getDate(){
		return date;
	}
	
	public Message.Type getType(){
		return type;
	}

	public String getDevice() {
		return device;
	}

	public void setDevice(String device) {
		this.device = device;
	}
	
	public String toString(){
		return DateFormat.format("dd.MMM.yyyy - kk:mm", getDate())  + " - " + getDevice();
	}
}
